package com.lc.activiti.sys.controller;


import com.lc.activiti.config.Result;
import com.lc.activiti.sys.entity.SysUserRole;
import com.lc.activiti.sys.service.SysUserRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 人员角色关系(SysUserRole)表控制层
 *
 * @author 骆超
 * @since 2021-06-28 15:37:20
 */
@RestController
@RequestMapping("sysUserRole")
@Api(tags = "人员角色关系")
public class SysUserRoleController {
    /**
     * 服务对象
     */
    @Resource
    private SysUserRoleService sysUserRoleService;

    /**
     * 保存用户与角色的关系
     * @author 骆超
     * @date 2021/6/28
     * @param sysUserRole 参数说明
     * @return com.lc.activiti.config.Result
     */
    @PostMapping("saveUserRole")
    @ApiOperation("保存用户与角色的关系")
    public Result saveUserRole(@RequestBody SysUserRole sysUserRole){
        return sysUserRoleService.saveUserRole(sysUserRole);
    }
}
